import request from '@/utils/request'

// 查询投资产品订单列表
export function listInvestorder(query) {
  return request({
    url: '/business/investorder/list',
    method: 'get',
    params: query
  })
}

// 查询投资产品订单详细
export function getInvestorder(id) {
  return request({
    url: '/business/investorder/' + id,
    method: 'get'
  })
}

// 新增投资产品订单
export function addInvestorder(data) {
  return request({
    url: '/business/investorder',
    method: 'post',
    data: data
  })
}

// 修改投资产品订单
export function updateInvestorder(data) {
  return request({
    url: '/business/investorder',
    method: 'put',
    data: data
  })
}

// 删除投资产品订单
export function delInvestorder(id) {
  return request({
    url: '/business/investorder/' + id,
    method: 'delete'
  })
}

export function listProducts() {
  return request({
    url: '/business/investorder/searchProducts',
    method: 'get',
  })
}